package com.woniuxy.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.woniuxy.entity.Orders;
@Mapper
public interface OrderMapper {
	//查找买家所有订单
		@Select("select * from `orders` where u_id=#{uid}")
		public  List<Orders> find(int uid);
		//根据买家id删除订单
		@Delete("delete from orders where o_id=#{o_id}")
		public int del(int o_id);
		//查找卖家所有订单
		@Select("select * from orders where seller_id=#{u_id}")
		public List<Orders> findsellerorders(int u_id);
	
	
		//通过订单id查找订单详情
		@Select("select * from orders where o_id=#{orderid}")
		public Orders findorderdetail(int orderid);
	
	
	
	
}
          